package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:张熳
 * Date:2025-08-27
 * Time:17:32
 */
//抽象类

public abstract class Shape {
    //抽象类内部可以包含普通方法和属性，甚至构造方法
    public String name;
    public int age;

    public void eat(){

    }

   /* public Shape(String name, int age) {
        this.name = name;
        this.age = age;
    }*/

    //抽象方法-可以没有具体实现
    public abstract void draw();

    //抽象类中也可以有静态代码块和实例代码块
    /*static {
        System.out.println("静态代码块");
    }

    {
        System.out.println("实例代码块");
    }*/
}
